﻿@model IEnumerable<Health.Models.SearchViewModel>
@{
    ViewBag.Title = "ContactInfo";
}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" href="~/Content/newbootstrap.min.css">
<script src="~/Content/jquery.min.js"></script>
<script src="~/Content/newbootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="~/Content/Site.css">
<link rel="stylesheet" type="text/css" media="screen" href="~/Content/MobileStyles.css">

<head>
    <title>

    </title>
</head>
<body>
    <style>
        h4 {
            float: none;
            margin: 0px;
            color: white;
            padding-top: 10px;
            text-align: center;
        }
        h5
        {
            float: none;
            margin: 0px;
            color: white;
            padding-top: 10px;
            font-weight: bold;
        }
    </style>
    @foreach (var item in Model)
    {
        <div class="container-fluid navbar-fixed-top header">
            <div class="headerImage">
                <a href='@Url.Action("Index", "Patient", new { ID = item.Identifier })'>
                    @if (item.Photo != null)
                    {
                        <img src="@String.Format("data:image/png;base64,{0}", item.Photo)" class="headerImageC img-circle">
                    }
                    else
                    {
                        <img src="~/Content/Image/Maureen_1.jpeg" class="headerImageC img-circle">
                    }
                </a>
            </div>
            <div class="headerName">
   
</div>
        </div>
    <div class="container profileContent fade-in">

        <span class="name">@Html.DisplayFor(modelItem => item.LastName), @Html.DisplayFor(modelItem => item.FirstName)</span><br/>
        @if (item.Gender == "M")
        {
            <span>
                <img class="genderIcon" src="~/Content/Image/genderMale.png" />
            </span>
        }
        else if (item.Gender == "F")
        {
            <span>
                <img class="genderIcon" src="~/Content/Image/genderFemale.png" />
            </span>
        }
        else
        {
            <span>
                <img class="genderIcon" src="~/Content/Image/genderUnknown.png" />
            </span>
        }
        <span>@Html.DisplayFor(modelItem => item.BirthDate), @Html.DisplayFor(modelItem => item.Age)<br /></span>

        <span>@Html.DisplayFor(modelItem => item.City), @Html.DisplayFor(modelItem => item.State)</span>

    </div>

    <div class="panel panel-default content fade-in">
        <div class="panel-heading">
            <h5 class="panel-title">Personal Contact</h5>
        </div>
        <div class="panel-body">
            @if (item.EmergencyContact != null)
            {
                foreach (var emergContact in item.EmergencyContact)
                {
                    @Html.DisplayFor(modelItem => emergContact)<br />
                }
            }
            else
            {
                <strong>No emergency contacts listed</strong>
            }
            
        </div>
    </div>

    <div class="panel panel-default bottomContent fade-in">
        <div class="panel-heading">
            <h5 class="panel-title">Medical Contact</h5>
        </div>
        <div class="panel-body">
            @if (item.PractitionerContact != null)
            {
                foreach (var drContact in item.PractitionerContact)
                {
                    @Html.DisplayFor(modelItem => drContact)<br />
                }
            }
            else
            {
                <strong>No medical contacts listed</strong>
            }
           
           
        </div>
    </div>

    <div class="container-fluid bottomButtons">
        <div class="row fade-in">
            <div class="col-xs-2 text-center">
                @Html.ActionLink(" ", "MedicalHistory", "Patient", new { ID = item.Identifier }, new { @class = "btn btn-default pageButtonBar", id = "medicalConditionsButtonBar" })
            </div>
            <div class="col-xs-2 text-center">
                @Html.ActionLink(" ", "Medications", "Patient", new { ID = item.Identifier }, new { @class = "btn btn-default pageButtonBar", id = "medicationsButtonBar" })
            </div>
            <div class="col-xs-2 text-center">
                @Html.ActionLink(" ", "Allergies", "Patient", new { ID = item.Identifier }, new { @class = "btn btn-default pageButtonBar", id = "allergiesButtonBar" })
            </div>

            <div class="col-xs-2 text-center">
                @Html.ActionLink(" ", "Devices", "Patient", new { ID = item.Identifier }, new { @class = "btn btn-default pageButtonBar", id = "devicesButtonBar" })
            </div>
            <div class="col-xs-2 text-center">
                @Html.ActionLink(" ", "SpecialNeeds", "Patient", new { ID = item.Identifier }, new { @class = "btn btn-default pageButtonBar", id = "specialNeedsButtonBar" })
            </div>
            <div class="col-xs-2 text-center">
                @Html.ActionLink(" ", "ContactInfo", "Patient", new { ID = item.Identifier }, new { @class = "btn btn-default pageButtonBar", id = "callMedicAlertBar" })
            </div>
        </div>
    </div>
    }
    </body>
